package cn.ztydata.teachingsystem.heaven.web.dto;

import cn.ztydata.teachingsystem.heaven.entity.KnowledgePoint;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * ResourceGroupDto
 *
 * @author lyj
 * @since 2015/4/11
 */
public class ResourceGroupDto {
    @NotNull
    @Range(min = 0, max = 3, message = "群组类型不合法")
    private Integer groupType; //群组类型（0非群组 1课程群组 2专业群组 3班级群组）

    @NotNull
    @Min(value = 1, message = "群组ID必须大于零")
    private Long groupId; //群组id

    @NotNull
    @Min(value = 0, message = "所属系部编号不合法")
    private Long deptId; //系部ID

    @NotNull
    @Min(value = 0, message = "所属专业编号不合法")
    private Long majorId; //专业编号
    private String majorName; //专业名称

    @NotNull
    @Min(value = 0, message = "课程Id必须大于零")
    private Long lessonId; //课程ID

    private String lessonCode; //课程代码

    @NotNull
    @Length(min = 1, max = 60, message = "名称长度应为1~60")
    private String name; //资源名称

    @Length(max = 60, message = "名称长度应为0~60")
    private String author; //作者

    @NotNull
    @Min(value = 1, message = "资源类型编号不合法")
    private Integer typeId; //类型编号

    @NotNull
    private String typeName; //类型

    private String source; //资源来源
    private String remark; //简介
    private List<KnowledgePoint> tags;//关键字集合

    @NotNull
    @Range(min = 0, max = 1, message = "资源种类不合法")
    private Integer mold;//种类

    private String downUrl;//下载地址
    private String content;//内容


    public Integer getGroupType() {
        return groupType;
    }

    public void setGroupType(Integer groupType) {
        this.groupType = groupType;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getMajorId() {
        return majorId;
    }

    public void setMajorId(Long majorId) {
        this.majorId = majorId;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<KnowledgePoint> getTags() {
        return tags;
    }

    public void setTags(List<KnowledgePoint> tags) {
        this.tags = tags;
    }

    public Integer getMold() {
        return mold;
    }

    public void setMold(Integer mold) {
        this.mold = mold;
    }

    public String getDownUrl() {
        return downUrl;
    }

    public void setDownUrl(String downUrl) {
        this.downUrl = downUrl;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getLessonCode() {
        return lessonCode;
    }

    public void setLessonCode(String lessonCode) {
        this.lessonCode = lessonCode;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
